export default {
	//数据
	data() {
		return {
      portalMainImgUrl: "", //门户主图
      portalSecondImgUrl: "", //门户次图
      policyRelease: {}, //政策
      fatherIndex:0, //一级菜单下标
       childIndex:0,//二级菜单下标
		}
	},
	created() { //调用方法
    let that = this;
    //获取课程uuid
    let uuid = that.get("policyDetailsid");
    that.$post(
      that.urls.getPolicyRelease,
      {"uuid": uuid}
    )
    .then(function(res) {
      if(res.success) {
        that.policyRelease = res.data;
      }
    })

    //初始化门户图片信息
    that.$post(
      that.urls.getAllPortalConfigList, {
        "type": 0
      }
    )
      .then(function(res) {
        if(res.success) {
          let portalConfigList = res.data;
          for(let i = 0, len = portalConfigList.length; i < len; i++) {
            if(portalConfigList[i].baseType == 0) {
              that.portalMainImgUrl = portalConfigList[i].url; //门户主图
            } else if(portalConfigList[i].baseType == 1) {
              that.portalSecondImgUrl = portalConfigList[i].url; //门户次图
            }
          }
        }
      })
	},
	mounted() {

	},
	updated:function(){
		if(this.getParamValue("fatherIndex")){
			this.fatherIndex=this.getParamValue("fatherIndex");
		}
		if(this.getParamValue("childIndex")){
			this.childIndex=this.getParamValue("childIndex");
		}
	},
	methods: { //写函数方法

	}
}
